#include <iostream>
using namespace std;

void remove(char s[],int loc){
	for(int i = loc;s[i] != '\0';i++)
		s[i	] = s[i+1];
}

int squeeze(char s1[], const char s2[]){
	int count = 0;
	for(int i = 0;s2[i] != '\0';i++)
		for(int j = 0;s1[j] != '\0';j++)
			if(s1[j] == s2[i]){
				remove(s1,j);
				count++;
			}
	return count;
}

void main(){
	char s1[] = "asfewfdfrgr";
	char s2[] = "af";
	int r = squeeze( s1,s2);
	cout << r << " " << s1 << endl;
	system("pause");
}